﻿using Koonsoft.HYCRM.DAL;
using Koonsoft.HYCRM.Model;

namespace Koonsoft.HYCRM.BLL
{
    public class ClientBLL
    {
        private ClientDAL _dal = null;

        protected ClientDAL DAL
        {
            get
            {
                if (_dal == null)
                {
                    _dal = new ClientDAL();
                }

                return _dal;
            }
        }

        /// <summary>
        /// 根据订单号获取客户信息
        /// </summary>
        /// <param name="orderID"></param>
        /// <returns></returns>
        public ClientInfo GetClientInfoByOrderID(string orderID)
        {
            return DAL.GetClientInfoByOrderID(orderID);
        }

        /// <summary>
        /// 根据客户号获取客户信息
        /// </summary>
        /// <param name="clientID"></param>
        /// <param name="empolyeeID"></param>
        /// <returns></returns>
        public ClientInfo GetClientInfoByClientID(string clientID,int empolyeeID)
        {
            return DAL.GetClientInfoByClientID(clientID);
        }
    }
}
